3.8.37 \(\int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx\) [737]

3.8.37.1 Optimal result
3.8.37.2 Mathematica [A] (verified)
3.8.37.3 Rubi [A] (verified)
3.8.37.4 Maple [A] (verified)
3.8.37.5 Fricas [A] (verification not implemented)
3.8.37.6 Sympy [A] (verification not implemented)
3.8.37.7 Maxima [F(-2)]
3.8.37.8 Giac [A] (verification not implemented)
3.8.37.9 Mupad [B] (verification not implemented)

3.8.37.1 Optimal result

Integrand size = 41, antiderivative size = 251 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx=\frac {5 (7 A+i B) x}{128 a^3 c^4}+\frac {A+i B}{96 a^3 c^4 f (i-\tan (e+f x))^3}-\frac {5 i A-3 B}{128 a^3 c^4 f (i-\tan (e+f x))^2}-\frac {5 (3 A+i B)}{128 a^3 c^4 f (i-\tan (e+f x))}-\frac {i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^4}-\frac {2 A-i B}{48 a^3 c^4 f (i+\tan (e+f x))^3}+\frac {5 i A+B}{64 a^3 c^4 f (i+\tan (e+f x))^2}+\frac {5 A}{32 a^3 c^4 f (i+\tan (e+f x))} \]

output
5/128*(7*A+I*B)*x/a^3/c^4+1/96*(A+I*B)/a^3/c^4/f/(I-tan(f*x+e))^3+1/128*(- 
5*I*A+3*B)/a^3/c^4/f/(I-tan(f*x+e))^2-5/128*(3*A+I*B)/a^3/c^4/f/(I-tan(f*x 
+e))+1/64*(-I*A-B)/a^3/c^4/f/(I+tan(f*x+e))^4+1/48*(-2*A+I*B)/a^3/c^4/f/(I 
+tan(f*x+e))^3+1/64*(5*I*A+B)/a^3/c^4/f/(I+tan(f*x+e))^2+5/32*A/a^3/c^4/f/ 
(I+tan(f*x+e))
 
3.8.37.2 Mathematica [A] (verified)

Time = 6.40 (sec) , antiderivative size = 221, normalized size of antiderivative = 0.88 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx=\frac {\sec ^6(e+f x) (319 A-23 i B-(113 A+119 i B) \cos (2 (e+f x))-13 A \cos (4 (e+f x))-43 i B \cos (4 (e+f x))-A \cos (6 (e+f x))-7 i B \cos (6 (e+f x))+315 i A \sin (2 (e+f x))-45 B \sin (2 (e+f x))+63 i A \sin (4 (e+f x))-9 B \sin (4 (e+f x))+7 i A \sin (6 (e+f x))-B \sin (6 (e+f x))+60 (7 A+i B) \arctan (\tan (e+f x)) (i+\tan (e+f x)))}{1536 a^3 c^4 f (-i+\tan (e+f x))^3 (i+\tan (e+f x))^4} \]

input
Integrate[(A + B*Tan[e + f*x])/((a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + 
f*x])^4),x]
 
output
(Sec[e + f*x]^6*(319*A - (23*I)*B - (113*A + (119*I)*B)*Cos[2*(e + f*x)] - 
 13*A*Cos[4*(e + f*x)] - (43*I)*B*Cos[4*(e + f*x)] - A*Cos[6*(e + f*x)] - 
(7*I)*B*Cos[6*(e + f*x)] + (315*I)*A*Sin[2*(e + f*x)] - 45*B*Sin[2*(e + f* 
x)] + (63*I)*A*Sin[4*(e + f*x)] - 9*B*Sin[4*(e + f*x)] + (7*I)*A*Sin[6*(e 
+ f*x)] - B*Sin[6*(e + f*x)] + 60*(7*A + I*B)*ArcTan[Tan[e + f*x]]*(I + Ta 
n[e + f*x])))/(1536*a^3*c^4*f*(-I + Tan[e + f*x])^3*(I + Tan[e + f*x])^4)
 
3.8.37.3 Rubi [A] (verified)

Time = 0.44 (sec) , antiderivative size = 198, normalized size of antiderivative = 0.79, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.122, Rules used = {3042, 4071, 27, 86, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4}dx\)

\(\Big \downarrow \) 4071

\(\displaystyle \frac {a c \int \frac {A+B \tan (e+f x)}{a^4 c^5 (1-i \tan (e+f x))^5 (i \tan (e+f x)+1)^4}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\int \frac {A+B \tan (e+f x)}{(1-i \tan (e+f x))^5 (i \tan (e+f x)+1)^4}d\tan (e+f x)}{a^3 c^4 f}\)

\(\Big \downarrow \) 86

\(\displaystyle \frac {\int \left (-\frac {5 A}{32 (\tan (e+f x)+i)^2}+\frac {5 (7 A+i B)}{128 \left (\tan ^2(e+f x)+1\right )}-\frac {5 (3 A+i B)}{128 (\tan (e+f x)-i)^2}+\frac {i (5 A+3 i B)}{64 (\tan (e+f x)-i)^3}-\frac {i (5 A-i B)}{32 (\tan (e+f x)+i)^3}+\frac {A+i B}{32 (\tan (e+f x)-i)^4}+\frac {2 A-i B}{16 (\tan (e+f x)+i)^4}+\frac {i A+B}{16 (\tan (e+f x)+i)^5}\right )d\tan (e+f x)}{a^3 c^4 f}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\frac {5}{128} (7 A+i B) \arctan (\tan (e+f x))-\frac {5 (3 A+i B)}{128 (-\tan (e+f x)+i)}-\frac {-3 B+5 i A}{128 (-\tan (e+f x)+i)^2}+\frac {B+5 i A}{64 (\tan (e+f x)+i)^2}+\frac {A+i B}{96 (-\tan (e+f x)+i)^3}-\frac {2 A-i B}{48 (\tan (e+f x)+i)^3}-\frac {B+i A}{64 (\tan (e+f x)+i)^4}+\frac {5 A}{32 (\tan (e+f x)+i)}}{a^3 c^4 f}\)

input
Int[(A + B*Tan[e + f*x])/((a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + f*x])^ 
4),x]
 
output
((5*(7*A + I*B)*ArcTan[Tan[e + f*x]])/128 + (A + I*B)/(96*(I - Tan[e + f*x 
])^3) - ((5*I)*A - 3*B)/(128*(I - Tan[e + f*x])^2) - (5*(3*A + I*B))/(128* 
(I - Tan[e + f*x])) - (I*A + B)/(64*(I + Tan[e + f*x])^4) - (2*A - I*B)/(4 
8*(I + Tan[e + f*x])^3) + ((5*I)*A + B)/(64*(I + Tan[e + f*x])^2) + (5*A)/ 
(32*(I + Tan[e + f*x])))/(a^3*c^4*f)
 

3.8.37.3.1 Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 86
Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_ 
.), x_] :> Int[ExpandIntegrand[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; 
 FreeQ[{a, b, c, d, e, f, n}, x] && ((ILtQ[n, 0] && ILtQ[p, 0]) || EqQ[p, 1 
] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p 
+ 1, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4071
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)])*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si 
mp[a*(c/f)   Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x], x 
, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c 
+ a*d, 0] && EqQ[a^2 + b^2, 0]
 
3.8.37.4 Maple [A] (verified)

Time = 0.26 (sec) , antiderivative size = 261, normalized size of antiderivative = 1.04

method result size
norman \(\frac {\frac {5 \left (i B +7 A \right ) x}{128 a c}-\frac {i A +B}{8 a c f}+\frac {\left (-5 i B +93 A \right ) \tan \left (f x +e \right )}{128 a c f}+\frac {73 \left (i B +7 A \right ) \tan \left (f x +e \right )^{3}}{384 a c f}+\frac {55 \left (i B +7 A \right ) \tan \left (f x +e \right )^{5}}{384 a c f}+\frac {5 \left (i B +7 A \right ) \tan \left (f x +e \right )^{7}}{128 a c f}+\frac {5 \left (i B +7 A \right ) x \tan \left (f x +e \right )^{2}}{32 a c}+\frac {15 \left (i B +7 A \right ) x \tan \left (f x +e \right )^{4}}{64 a c}+\frac {5 \left (i B +7 A \right ) x \tan \left (f x +e \right )^{6}}{32 a c}+\frac {5 \left (i B +7 A \right ) x \tan \left (f x +e \right )^{8}}{128 a c}}{a^{2} c^{3} \left (1+\tan \left (f x +e \right )^{2}\right )^{4}}\) \(261\)
risch \(\frac {i \sin \left (2 f x +2 e \right ) B}{64 a^{3} c^{4} f}+\frac {35 x A}{128 a^{3} c^{4}}-\frac {{\mathrm e}^{8 i \left (f x +e \right )} B}{1024 a^{3} c^{4} f}-\frac {7 i \cos \left (2 f x +2 e \right ) A}{128 a^{3} c^{4} f}-\frac {\cos \left (6 f x +6 e \right ) B}{128 a^{3} c^{4} f}-\frac {i \cos \left (6 f x +6 e \right ) A}{128 a^{3} c^{4} f}-\frac {7 i \cos \left (4 f x +4 e \right ) A}{256 a^{3} c^{4} f}+\frac {\sin \left (6 f x +6 e \right ) A}{96 a^{3} c^{4} f}-\frac {7 \cos \left (4 f x +4 e \right ) B}{256 a^{3} c^{4} f}-\frac {i {\mathrm e}^{8 i \left (f x +e \right )} A}{1024 a^{3} c^{4} f}-\frac {i \sin \left (6 f x +6 e \right ) B}{192 a^{3} c^{4} f}+\frac {7 \sin \left (4 f x +4 e \right ) A}{128 a^{3} c^{4} f}-\frac {7 \cos \left (2 f x +2 e \right ) B}{128 a^{3} c^{4} f}+\frac {5 i x B}{128 a^{3} c^{4}}-\frac {i \sin \left (4 f x +4 e \right ) B}{128 a^{3} c^{4} f}+\frac {7 \sin \left (2 f x +2 e \right ) A}{32 a^{3} c^{4} f}\) \(324\)
derivativedivides \(-\frac {A}{96 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{3}}+\frac {i B}{48 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {5 i A}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {15 A}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )}-\frac {i B}{96 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{3}}+\frac {35 A \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{3} c^{4}}+\frac {5 i B \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{3} c^{4}}-\frac {5 i A}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {3 B}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i A}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {B}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {5 i B}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )}-\frac {B}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {A}{24 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {5 A}{32 a^{3} c^{4} f \left (i+\tan \left (f x +e \right )\right )}\) \(346\)
default \(-\frac {A}{96 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{3}}+\frac {i B}{48 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {5 i A}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {15 A}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )}-\frac {i B}{96 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{3}}+\frac {35 A \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{3} c^{4}}+\frac {5 i B \arctan \left (\tan \left (f x +e \right )\right )}{128 f \,a^{3} c^{4}}-\frac {5 i A}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{2}}+\frac {3 B}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )^{2}}-\frac {i A}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{4}}+\frac {B}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{2}}+\frac {5 i B}{128 f \,a^{3} c^{4} \left (-i+\tan \left (f x +e \right )\right )}-\frac {B}{64 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{4}}-\frac {A}{24 f \,a^{3} c^{4} \left (i+\tan \left (f x +e \right )\right )^{3}}+\frac {5 A}{32 a^{3} c^{4} f \left (i+\tan \left (f x +e \right )\right )}\) \(346\)

input
int((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3/(c-I*c*tan(f*x+e))^4,x,method=_R 
ETURNVERBOSE)
 
output
(5/128*(7*A+I*B)/a/c*x-1/8*(I*A+B)/a/c/f+1/128*(-5*I*B+93*A)/a/c/f*tan(f*x 
+e)+73/384*(7*A+I*B)/a/c/f*tan(f*x+e)^3+55/384*(7*A+I*B)/a/c/f*tan(f*x+e)^ 
5+5/128*(7*A+I*B)/a/c/f*tan(f*x+e)^7+5/32*(7*A+I*B)/a/c*x*tan(f*x+e)^2+15/ 
64*(7*A+I*B)/a/c*x*tan(f*x+e)^4+5/32*(7*A+I*B)/a/c*x*tan(f*x+e)^6+5/128*(7 
*A+I*B)/a/c*x*tan(f*x+e)^8)/a^2/c^3/(1+tan(f*x+e)^2)^4
 
3.8.37.5 Fricas [A] (verification not implemented)

Time = 0.26 (sec) , antiderivative size = 151, normalized size of antiderivative = 0.60 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx=\frac {{\left (120 \, {\left (7 \, A + i \, B\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} - 3 \, {\left (i \, A + B\right )} e^{\left (14 i \, f x + 14 i \, e\right )} - 4 \, {\left (7 i \, A + 5 \, B\right )} e^{\left (12 i \, f x + 12 i \, e\right )} - 18 \, {\left (7 i \, A + 3 \, B\right )} e^{\left (10 i \, f x + 10 i \, e\right )} - 60 \, {\left (7 i \, A + B\right )} e^{\left (8 i \, f x + 8 i \, e\right )} - 36 \, {\left (-7 i \, A + 3 \, B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 6 \, {\left (-7 i \, A + 5 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, A - 4 \, B\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{3072 \, a^{3} c^{4} f} \]

input
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3/(c-I*c*tan(f*x+e))^4,x, al 
gorithm="fricas")
 
output
1/3072*(120*(7*A + I*B)*f*x*e^(6*I*f*x + 6*I*e) - 3*(I*A + B)*e^(14*I*f*x 
+ 14*I*e) - 4*(7*I*A + 5*B)*e^(12*I*f*x + 12*I*e) - 18*(7*I*A + 3*B)*e^(10 
*I*f*x + 10*I*e) - 60*(7*I*A + B)*e^(8*I*f*x + 8*I*e) - 36*(-7*I*A + 3*B)* 
e^(4*I*f*x + 4*I*e) - 6*(-7*I*A + 5*B)*e^(2*I*f*x + 2*I*e) + 4*I*A - 4*B)* 
e^(-6*I*f*x - 6*I*e)/(a^3*c^4*f)
 
3.8.37.6 Sympy [A] (verification not implemented)

Time = 0.63 (sec) , antiderivative size = 605, normalized size of antiderivative = 2.41 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx=\begin {cases} \frac {\left (\left (13510798882111488 i A a^{18} c^{24} f^{6} e^{6 i e} - 13510798882111488 B a^{18} c^{24} f^{6} e^{6 i e}\right ) e^{- 6 i f x} + \left (141863388262170624 i A a^{18} c^{24} f^{6} e^{8 i e} - 101330991615836160 B a^{18} c^{24} f^{6} e^{8 i e}\right ) e^{- 4 i f x} + \left (851180329573023744 i A a^{18} c^{24} f^{6} e^{10 i e} - 364791569817010176 B a^{18} c^{24} f^{6} e^{10 i e}\right ) e^{- 2 i f x} + \left (- 1418633882621706240 i A a^{18} c^{24} f^{6} e^{14 i e} - 202661983231672320 B a^{18} c^{24} f^{6} e^{14 i e}\right ) e^{2 i f x} + \left (- 425590164786511872 i A a^{18} c^{24} f^{6} e^{16 i e} - 182395784908505088 B a^{18} c^{24} f^{6} e^{16 i e}\right ) e^{4 i f x} + \left (- 94575592174780416 i A a^{18} c^{24} f^{6} e^{18 i e} - 67553994410557440 B a^{18} c^{24} f^{6} e^{18 i e}\right ) e^{6 i f x} + \left (- 10133099161583616 i A a^{18} c^{24} f^{6} e^{20 i e} - 10133099161583616 B a^{18} c^{24} f^{6} e^{20 i e}\right ) e^{8 i f x}\right ) e^{- 12 i e}}{10376293541461622784 a^{21} c^{28} f^{7}} & \text {for}\: a^{21} c^{28} f^{7} e^{12 i e} \neq 0 \\x \left (- \frac {35 A + 5 i B}{128 a^{3} c^{4}} + \frac {\left (A e^{14 i e} + 7 A e^{12 i e} + 21 A e^{10 i e} + 35 A e^{8 i e} + 35 A e^{6 i e} + 21 A e^{4 i e} + 7 A e^{2 i e} + A - i B e^{14 i e} - 5 i B e^{12 i e} - 9 i B e^{10 i e} - 5 i B e^{8 i e} + 5 i B e^{6 i e} + 9 i B e^{4 i e} + 5 i B e^{2 i e} + i B\right ) e^{- 6 i e}}{128 a^{3} c^{4}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (35 A + 5 i B\right )}{128 a^{3} c^{4}} \]

input
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))**3/(c-I*c*tan(f*x+e))**4,x)
 
output
Piecewise((((13510798882111488*I*A*a**18*c**24*f**6*exp(6*I*e) - 135107988 
82111488*B*a**18*c**24*f**6*exp(6*I*e))*exp(-6*I*f*x) + (14186338826217062 
4*I*A*a**18*c**24*f**6*exp(8*I*e) - 101330991615836160*B*a**18*c**24*f**6* 
exp(8*I*e))*exp(-4*I*f*x) + (851180329573023744*I*A*a**18*c**24*f**6*exp(1 
0*I*e) - 364791569817010176*B*a**18*c**24*f**6*exp(10*I*e))*exp(-2*I*f*x) 
+ (-1418633882621706240*I*A*a**18*c**24*f**6*exp(14*I*e) - 202661983231672 
320*B*a**18*c**24*f**6*exp(14*I*e))*exp(2*I*f*x) + (-425590164786511872*I* 
A*a**18*c**24*f**6*exp(16*I*e) - 182395784908505088*B*a**18*c**24*f**6*exp 
(16*I*e))*exp(4*I*f*x) + (-94575592174780416*I*A*a**18*c**24*f**6*exp(18*I 
*e) - 67553994410557440*B*a**18*c**24*f**6*exp(18*I*e))*exp(6*I*f*x) + (-1 
0133099161583616*I*A*a**18*c**24*f**6*exp(20*I*e) - 10133099161583616*B*a* 
*18*c**24*f**6*exp(20*I*e))*exp(8*I*f*x))*exp(-12*I*e)/(103762935414616227 
84*a**21*c**28*f**7), Ne(a**21*c**28*f**7*exp(12*I*e), 0)), (x*(-(35*A + 5 
*I*B)/(128*a**3*c**4) + (A*exp(14*I*e) + 7*A*exp(12*I*e) + 21*A*exp(10*I*e 
) + 35*A*exp(8*I*e) + 35*A*exp(6*I*e) + 21*A*exp(4*I*e) + 7*A*exp(2*I*e) + 
 A - I*B*exp(14*I*e) - 5*I*B*exp(12*I*e) - 9*I*B*exp(10*I*e) - 5*I*B*exp(8 
*I*e) + 5*I*B*exp(6*I*e) + 9*I*B*exp(4*I*e) + 5*I*B*exp(2*I*e) + I*B)*exp( 
-6*I*e)/(128*a**3*c**4)), True)) + x*(35*A + 5*I*B)/(128*a**3*c**4)
 
3.8.37.7 Maxima [F(-2)]

Exception generated. \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx=\text {Exception raised: RuntimeError} \]

input
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3/(c-I*c*tan(f*x+e))^4,x, al 
gorithm="maxima")
 
output
Exception raised: RuntimeError >> ECL says: expt: undefined: 0 to a negati 
ve exponent.
 
3.8.37.8 Giac [A] (verification not implemented)

Time = 0.85 (sec) , antiderivative size = 251, normalized size of antiderivative = 1.00 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx=\frac {\frac {60 \, {\left (7 i \, A - B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a^{3} c^{4}} - \frac {60 \, {\left (7 i \, A - B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{3} c^{4}} + \frac {2 \, {\left (385 \, A \tan \left (f x + e\right )^{3} + 55 i \, B \tan \left (f x + e\right )^{3} - 1335 i \, A \tan \left (f x + e\right )^{2} + 225 \, B \tan \left (f x + e\right )^{2} - 1575 \, A \tan \left (f x + e\right ) - 321 i \, B \tan \left (f x + e\right ) + 641 i \, A - 167 \, B\right )}}{a^{3} c^{4} {\left (i \, \tan \left (f x + e\right ) + 1\right )}^{3}} + \frac {-875 i \, A \tan \left (f x + e\right )^{4} + 125 \, B \tan \left (f x + e\right )^{4} + 3980 \, A \tan \left (f x + e\right )^{3} + 500 i \, B \tan \left (f x + e\right )^{3} + 6930 i \, A \tan \left (f x + e\right )^{2} - 702 \, B \tan \left (f x + e\right )^{2} - 5548 \, A \tan \left (f x + e\right ) - 340 i \, B \tan \left (f x + e\right ) - 1771 i \, A - 35 \, B}{a^{3} c^{4} {\left (\tan \left (f x + e\right ) + i\right )}^{4}}}{3072 \, f} \]

input
integrate((A+B*tan(f*x+e))/(a+I*a*tan(f*x+e))^3/(c-I*c*tan(f*x+e))^4,x, al 
gorithm="giac")
 
output
1/3072*(60*(7*I*A - B)*log(tan(f*x + e) + I)/(a^3*c^4) - 60*(7*I*A - B)*lo 
g(tan(f*x + e) - I)/(a^3*c^4) + 2*(385*A*tan(f*x + e)^3 + 55*I*B*tan(f*x + 
 e)^3 - 1335*I*A*tan(f*x + e)^2 + 225*B*tan(f*x + e)^2 - 1575*A*tan(f*x + 
e) - 321*I*B*tan(f*x + e) + 641*I*A - 167*B)/(a^3*c^4*(I*tan(f*x + e) + 1) 
^3) + (-875*I*A*tan(f*x + e)^4 + 125*B*tan(f*x + e)^4 + 3980*A*tan(f*x + e 
)^3 + 500*I*B*tan(f*x + e)^3 + 6930*I*A*tan(f*x + e)^2 - 702*B*tan(f*x + e 
)^2 - 5548*A*tan(f*x + e) - 340*I*B*tan(f*x + e) - 1771*I*A - 35*B)/(a^3*c 
^4*(tan(f*x + e) + I)^4))/f
 
3.8.37.9 Mupad [B] (verification not implemented)

Time = 10.53 (sec) , antiderivative size = 286, normalized size of antiderivative = 1.14 \[ \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^4} \, dx=\frac {\mathrm {tan}\left (e+f\,x\right )\,\left (-\frac {11\,B}{128\,a^3\,c^4}+\frac {A\,77{}\mathrm {i}}{128\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (-\frac {5\,B}{48\,a^3\,c^4}+\frac {A\,35{}\mathrm {i}}{48\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (\frac {35\,A}{48\,a^3\,c^4}+\frac {B\,5{}\mathrm {i}}{48\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (-\frac {5\,B}{128\,a^3\,c^4}+\frac {A\,35{}\mathrm {i}}{128\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (\frac {35\,A}{128\,a^3\,c^4}+\frac {B\,5{}\mathrm {i}}{128\,a^3\,c^4}\right )+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (\frac {77\,A}{128\,a^3\,c^4}+\frac {B\,11{}\mathrm {i}}{128\,a^3\,c^4}\right )+\frac {A}{8\,a^3\,c^4}-\frac {B\,1{}\mathrm {i}}{8\,a^3\,c^4}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^7+{\mathrm {tan}\left (e+f\,x\right )}^6\,1{}\mathrm {i}+3\,{\mathrm {tan}\left (e+f\,x\right )}^5+{\mathrm {tan}\left (e+f\,x\right )}^4\,3{}\mathrm {i}+3\,{\mathrm {tan}\left (e+f\,x\right )}^3+{\mathrm {tan}\left (e+f\,x\right )}^2\,3{}\mathrm {i}+\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )}+\frac {5\,x\,\left (7\,A+B\,1{}\mathrm {i}\right )}{128\,a^3\,c^4} \]

input
int((A + B*tan(e + f*x))/((a + a*tan(e + f*x)*1i)^3*(c - c*tan(e + f*x)*1i 
)^4),x)
 
output
(tan(e + f*x)*((A*77i)/(128*a^3*c^4) - (11*B)/(128*a^3*c^4)) + tan(e + f*x 
)^3*((A*35i)/(48*a^3*c^4) - (5*B)/(48*a^3*c^4)) + tan(e + f*x)^4*((35*A)/( 
48*a^3*c^4) + (B*5i)/(48*a^3*c^4)) + tan(e + f*x)^5*((A*35i)/(128*a^3*c^4) 
 - (5*B)/(128*a^3*c^4)) + tan(e + f*x)^6*((35*A)/(128*a^3*c^4) + (B*5i)/(1 
28*a^3*c^4)) + tan(e + f*x)^2*((77*A)/(128*a^3*c^4) + (B*11i)/(128*a^3*c^4 
)) + A/(8*a^3*c^4) - (B*1i)/(8*a^3*c^4))/(f*(tan(e + f*x) + tan(e + f*x)^2 
*3i + 3*tan(e + f*x)^3 + tan(e + f*x)^4*3i + 3*tan(e + f*x)^5 + tan(e + f* 
x)^6*1i + tan(e + f*x)^7 + 1i)) + (5*x*(7*A + B*1i))/(128*a^3*c^4)